<template>
  <el-card class="notFound layout" shadow="never">
    <!-- <img class="notFound-icon" src="@/assets/svgs/404.svg" /> -->
    <div class="notFound-title">404 Not Found</div>
    <div class="notFound-info">抱歉，你访问的页面不存在</div>
    <el-button class="notFound-button" type="primary" @click="handleBackHome"> 返回首页 </el-button>
  </el-card>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

const handleBackHome = () => {
  router.push({ path: '/' });
};
</script>

<script>
export default {
  name: 'NotFound',
};
</script>

<style lang="scss" scoped>
.notFound {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 0;
  :deep(.el-card__body) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex: 1;
  }
  &-title {
    margin-top: 8px;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    color: #404b5c;
  }
  &-info {
    margin-top: 8px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    color: #808792;
  }
  &-button {
    margin-top: 32px;
  }
}
</style>
